import Vue from 'vue'
let emitProxy = new Vue()
let goToNotificationByType = function (type, params) {
  console.log(type, params)
  let queryParam = ''
  if (params) {
    params = JSON.parse(params)

    let orderSn = params.orderSn

    if (orderSn) {
      queryParam = `?orderSn=${orderSn}`
    }
  }

  switch (type) {
    case 0:
      Vue.prototype.goRoute(`/#/sys-order${queryParam}`)
      break
    case 1:
      Vue.prototype.goRoute(`/#/sys-order${queryParam}`)
      break
    case 2:
      Vue.prototype.goRoute(`/#/sys-comment${queryParam}`)
      break
  }
}
export {
  emitProxy,
  goToNotificationByType
}
